home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / StandardFile.a < prev    next >
Text File  |  1996-05-01  |  7KB  |  256 lines

  1. ;
  2. ;    File:        StandardFile.a
  3. ;
  4. ;    Contains:    Standard File package Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  19. __STANDARDFILE__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  25.     include 'Dialogs.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  31. ;  The interfaces for other managers depend on these structs.
  32. SFReply                    RECORD 0
  33. good                     ds.b    1                ; offset: $0 (0)
  34. copy                     ds.b    1                ; offset: $1 (1)
  35. fType                     ds.l    1                ; offset: $2 (2)
  36. vRefNum                     ds.w    1                ; offset: $6 (6)
  37. version                     ds.w    1                ; offset: $8 (8)
  38. fName                     ds        Str63            ; offset: $A (10)
  39. sizeof                     EQU *                    ; size:   $4A (74)
  40.                         ENDR
  41. StandardFileReply        RECORD 0
  42. sfGood                     ds.b    1                ; offset: $0 (0)
  43. sfReplacing                 ds.b    1                ; offset: $1 (1)
  44. sfType                     ds.l    1                ; offset: $2 (2)
  45. sfFile                     ds        FSSpec            ; offset: $6 (6)
  46. sfScript                 ds.w    1                ; offset: $4C (76)
  47. sfFlags                     ds.w    1                ; offset: $4E (78)
  48. sfIsFolder                 ds.b    1                ; offset: $50 (80)
  49. sfIsVolume                 ds.b    1                ; offset: $51 (81)
  50. sfReserved1                 ds.l    1                ; offset: $52 (82)
  51. sfReserved2                 ds.w    1                ; offset: $56 (86)
  52. sizeof                     EQU *                    ; size:   $58 (88)
  53.                         ENDR
  54.     ENDIF
  55.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  56. ;
  57. ; * Note to developers targeting for system versions later than System 7.x.
  58. ; *
  59. ; * After System 7.x, the routines in this file will become obsolete!
  60. ; *
  61. ; * For software targeted to later system versions, do not include this file.
  62. ; * Instead, include Navigation and use its routines.  StandardFile routines will
  63. ; * be implemented only for backward compatibility with System 7.x software.
  64. ; *
  65. ;
  66.  
  67.                                                             ; resource IDs and item offsets of pre-7.0 dialogs 
  68. putDlgID                        EQU        -3999
  69. putSave                            EQU        1
  70. putCancel                        EQU        2
  71. putEject                        EQU        5
  72. putDrive                        EQU        6
  73. putName                            EQU        7
  74. getDlgID                        EQU        -4000
  75. getOpen                            EQU        1
  76. getCancel                        EQU        3
  77. getEject                        EQU        5
  78. getDrive                        EQU        6
  79. getNmList                        EQU        7
  80. getScroll                        EQU        8                    ; resource IDs and item offsets of 7.0 dialogs 
  81. sfPutDialogID                    EQU        -6043
  82. sfGetDialogID                    EQU        -6042
  83. sfItemOpenButton                EQU        1
  84. sfItemCancelButton                EQU        2
  85. sfItemBalloonHelp                EQU        3
  86. sfItemVolumeUser                EQU        4
  87. sfItemEjectButton                EQU        5
  88.  
  89. sfItemDesktopButton                EQU        6
  90. sfItemFileListUser                EQU        7
  91. sfItemPopUpMenuUser                EQU        8
  92. sfItemDividerLinePict            EQU        9
  93. sfItemFileNameTextEdit            EQU        10
  94. sfItemPromptStaticText            EQU        11
  95. sfItemNewFolderUser                EQU        12                    ; pseudo-item hits for use in DlgHook 
  96. sfHookFirstCall                    EQU        -1
  97. sfHookCharOffset                EQU        $1000
  98. sfHookNullEvent                    EQU        100
  99. sfHookRebuildList                EQU        101
  100. sfHookFolderPopUp                EQU        102
  101. sfHookOpenFolder                EQU        103                    ; the following are only in system 7.0+ 
  102. sfHookOpenAlias                    EQU        104
  103. sfHookGoToDesktop                EQU        105
  104. sfHookGoToAliasTarget            EQU        106
  105. sfHookGoToParent                EQU        107
  106. sfHookGoToNextDrive                EQU        108
  107. sfHookGoToPrevDrive                EQU        109
  108. sfHookChangeSelection            EQU        110
  109.  
  110. sfHookSetActiveOffset            EQU        200
  111. sfHookLastCall                    EQU        -2
  112. ;
  113. ; the refcon field of the dialog record during a
  114. ; modalfilter or dialoghook contains one of the following 
  115. ;
  116.  
  117. sfMainDialogRefCon                EQU        'stdf'
  118. sfNewFolderDialogRefCon            EQU        'nfdr'
  119. sfReplaceDialogRefCon            EQU        'rplc'
  120. sfStatWarnDialogRefCon            EQU        'stat'
  121. sfLockWarnDialogRefCon            EQU        'lock'
  122. sfErrorDialogRefCon                EQU        'err '
  123. ;  for CustomXXXFile, ActivationOrderListPtr parameter is a pointer to an array of item numbers 
  124. ; typedef const short *                    ActivationOrderListPtr
  125.  
  126. ;  the following also include an extra parameter of "your data pointer" 
  127. SFTypeList                RECORD 0
  128. elements                 ds.l    4
  129. sizeof                     EQU *                    ; size:   $10 (16)
  130.                         ENDR
  131.  
  132.  
  133. ;
  134. ;    The GetFile "typeList" parameter type has changed from "SFTypeList" to "ConstSFTypeListPtr".
  135. ;    For C, this will add "const" and make it an in-only parameter.
  136. ;    For Pascal, this will require client code to use the @ operator, but make it easier to specify long lists.
  137. ;
  138. ;    ConstSFTypeListPtr is a pointer to an array of OSTypes.
  139. ;
  140. ; typedef const OSType *                ConstSFTypeListPtr
  141.  
  142. ;
  143. ; pascal void SFPutFile(Point where, ConstStr255Param prompt, ConstStr255Param origName, DlgHookUPP dlgHook, SFReply *reply)
  144. ;
  145.     IF ¨ GENERATINGCFM THEN
  146.         Macro
  147.         _SFPutFile
  148.             move.w              #$0001,-(sp)
  149.             dc.w                $A9EA
  150.         EndM
  151.     ELSE
  152.         IMPORT_CFM_FUNCTION SFPutFile
  153.     ENDIF
  154.  
  155. ;
  156. ; pascal void SFGetFile(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply)
  157. ;
  158.     IF ¨ GENERATINGCFM THEN
  159.         Macro
  160.         _SFGetFile
  161.             move.w              #$0002,-(sp)
  162.             dc.w                $A9EA
  163.         EndM
  164.     ELSE
  165.         IMPORT_CFM_FUNCTION SFGetFile
  166.     ENDIF
  167.  
  168. ;
  169. ; pascal void SFPPutFile(Point where, ConstStr255Param prompt, ConstStr255Param origName, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
  170. ;
  171.     IF ¨ GENERATINGCFM THEN
  172.         Macro
  173.         _SFPPutFile
  174.             move.w              #$0003,-(sp)
  175.             dc.w                $A9EA
  176.         EndM
  177.     ELSE
  178.         IMPORT_CFM_FUNCTION SFPPutFile
  179.     ENDIF
  180.  
  181. ;
  182. ; pascal void SFPGetFile(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
  183. ;
  184.     IF ¨ GENERATINGCFM THEN
  185.         Macro
  186.         _SFPGetFile
  187.             move.w              #$0004,-(sp)
  188.             dc.w                $A9EA
  189.         EndM
  190.     ELSE
  191.         IMPORT_CFM_FUNCTION SFPGetFile
  192.     ENDIF
  193.  
  194. ;
  195. ; pascal void StandardPutFile(ConstStr255Param prompt, ConstStr255Param defaultName, StandardFileReply *reply)
  196. ;
  197.     IF ¨ GENERATINGCFM THEN
  198.         Macro
  199.         _StandardPutFile
  200.             move.w              #$0005,-(sp)
  201.             dc.w                $A9EA
  202.         EndM
  203.     ELSE
  204.         IMPORT_CFM_FUNCTION StandardPutFile
  205.     ENDIF
  206.  
  207. ;
  208. ; pascal void StandardGetFile(FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply)
  209. ;
  210.     IF ¨ GENERATINGCFM THEN
  211.         Macro
  212.         _StandardGetFile
  213.             move.w              #$0006,-(sp)
  214.             dc.w                $A9EA
  215.         EndM
  216.     ELSE
  217.         IMPORT_CFM_FUNCTION StandardGetFile
  218.     ENDIF
  219.  
  220. ;
  221. ; pascal void CustomPutFile(ConstStr255Param prompt, ConstStr255Param defaultName, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activate, void *yourDataPtr)
  222. ;
  223.     IF ¨ GENERATINGCFM THEN
  224.         Macro
  225.         _CustomPutFile
  226.             move.w              #$0007,-(sp)
  227.             dc.w                $A9EA
  228.         EndM
  229.     ELSE
  230.         IMPORT_CFM_FUNCTION CustomPutFile
  231.     ENDIF
  232.  
  233. ;
  234. ; pascal void CustomGetFile(FileFilterYDUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activate, void *yourDataPtr)
  235. ;
  236.     IF ¨ GENERATINGCFM THEN
  237.         Macro
  238.         _CustomGetFile
  239.             move.w              #$0008,-(sp)
  240.             dc.w                $A9EA
  241.         EndM
  242.     ELSE
  243.         IMPORT_CFM_FUNCTION CustomGetFile
  244.     ENDIF
  245.  
  246. ;
  247. ; pascal OSErr StandardOpenDialog(StandardFileReply *reply)
  248. ;
  249.     IF GENERATINGCFM THEN
  250.         IMPORT_CFM_FUNCTION StandardOpenDialog
  251.     ENDIF
  252.  
  253.     ENDIF
  254.     ENDIF ; __STANDARDFILE__ 
  255.  
  256.